package com.company.returnsion;

/**
 * @author VX5
 * @Title: MJC
 * @ProjectName DataStructure
 * @Description: TODO
 * @date ${DAT}13:53
 */
public class Fctorial {
    public static void main(String[] args) {
        System.out.println(fctorial(3));
    }
    public static int fctorial(int n){
        if (n > 1){
            return fctorial(n-1)*n;
        }else {
            return 1;
        }
    }
}
